import { post } from "../utils/request";
var app = getApp();


//获取所以地区码
export const getArea = (params) => {
  return post(app.globalData.apiUrl+'homePage/getArea',params);
};

//轮播图内商品列表
export const getBannerDetail = (params) => {
  return post(app.globalData.apiUrl+'homePage/getBannerDetail',params);
};


//获取轮播图列表
export const getBannerList = (params) => {
  return post(app.globalData.apiUrl+'homePage/getBannerList',params);
};


//导航栏内商品列表
export const getNavigationDetail = (params) => {
  return post(app.globalData.apiUrl+'homePage/getNavigationDetail',params);
};

//获取导航栏列表
export const getNavigationList = (params) => {
  return post(app.globalData.apiUrl+'homePage/getNavigationList',params);
};

//获取平台基本信息
export const getPlatform = (params) => {
  return post(app.globalData.apiUrl+'homePage/getPlatform',params);
};


//获取新品商品列表
export const getProductByNew = (params) => {
  return post(app.globalData.apiUrl+'homePage/getProductByNew',params);
};

//获取爆款商品列表
export const getProductBySales = (params) => {
  return post(app.globalData.apiUrl+'homePage/getProductBySales',params);
};

//标签栏内商品列表
export const getTabDetail = (params) => {
  return post(app.globalData.apiUrl+'homePage/getTabDetail',params);
};

//标签栏内商品列表
export const getTabList = (params) => {
  return post(app.globalData.apiUrl+'homePage/getTabList',params);
};

//上传文件
export const upload = (params) => {
  return post(app.globalData.apiUrl+'homePage/upload',params);
};